<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	
</script>
</head>
<body>
我是主页------想要:<a href="${pageContext.request.contextPath }/tuichu">退出</a><br>
添加信息：
<form action="add" method="get">
name:<input type="text" name="name">
mima:<input type="text" name="mima">
<input type="submit" value="添加">
</form>
<br>
<form action="zhu" method="get">
查询：<input type="text" name="username" value="${username}">
<input type="submit" value="查询">
</form>
<table border="1">
	<tr>
	<td>id</td>
	<td>name</td>
	<td>mima</td>
	</tr>
	<c:forEach var="user" items="${userlist}" varStatus="status">
	<tr>
	<td>${user.id}</td>
	<td>${user.name}</td>
	<td>${user.mima}</td>
	<td>
	<form action="update" method="get">
	<input type="hidden" value="${user.id}" name="id">
	<input type="submit" value="修改">
	</form>
	</td>
	<td>
	<form action="delete" method="get">
	<input type="hidden" value="${user.id}" name="id">
	<input type="submit" value="删除">
	</form>
	</td>
	</tr>
	</c:forEach>
</table>
总条数:${totalCount}&nbsp;当前页:${currentPageNo}/${totalPageCount}页
<c:if test="${currentPageNo > 1}">
	<a href="${pageContext.request.contextPath }/zhu?pageIndex=1&&username=${username}">首页</a>
	<a href="${pageContext.request.contextPath }/zhu?pageIndex=${currentPageNo-1}&&username=${username}">上一页</a>
</c:if>
<c:if test="${currentPageNo < totalPageCount }">
	<a href="${pageContext.request.contextPath }/zhu?pageIndex=${currentPageNo+1}&&username=${username}">下一页</a>
	<a href="${pageContext.request.contextPath }/zhu?pageIndex=${totalPageCount}&&username=${username}">最后一页</a>
</c:if>
<form action="zhu" method="get">
去<input type="text" name="pageIndex">页
<input type="submit" value="Go">
</form>
</body>
</html>